﻿using System.Web.Security;

namespace CodeContrib.Web.Security
{
	public class FormsAuthenticationProxy : IAuthenticationProxy
	{
		public string DefaultUrl
		{
			get { return FormsAuthentication.DefaultUrl; }
		}

		public string LoginUrl
		{
			get { return FormsAuthentication.LoginUrl; }
		}

		public string GetRedirectUrl(string username, bool createPersistentCookie)
		{
			return FormsAuthentication.GetRedirectUrl(username, createPersistentCookie);
		}

		public void RedirectFromLoginPage(string username, bool createPersistentCookie)
		{
			FormsAuthentication.RedirectFromLoginPage(username, createPersistentCookie);
		}

		public void SignIn(string username, bool createPersistentCookie)
		{
			FormsAuthentication.SetAuthCookie(username, createPersistentCookie);
		}

		public void SignOut()
		{
			FormsAuthentication.SignOut();
		}
	}
}